<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>FDCalendar test</title>
<style type="text/css">
body{font-size: 12px;background-color: #FFF;}
</style>
<!-- css -->
<link href="../../style/fdui.css" rel="stylesheet" type="text/css" />
<!-- lib -->
<script type="text/javascript" src="../../src/FDLib/FDLib.js"></script>
<script type="text/javascript" src="../../src/JsMap.js"></script>
</head>
<body>

<button onclick="getValue()">getValue</button>
<button onclick="setValue()">setValue('2013-01-01')</button>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<button onclick="show(event)">show</button>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input id="datepick">
<script type="text/javascript">
FDLib.setDir('../../src/');

var cal;

FDLib.loadJs('FDCalender',function() {
	cal = new FDCalendar();
	//cal.show();
	FDLib.getEl('datepick').onclick = function(e) {
		cal.show(e.target,'2012-9-3',true);
	}
	
});

function show(e) {
	e = FDLib.event.formatEvent(e)
	cal.show(e.target,'2012-9-8')
}
function getValue() {
	alert(cal.getValue());
}
function setValue() {
	cal.setValue('2013-01-01');
}

</script>
</body>
</html>